-
Notifications
You must be signed in to change notification settings - Fork 705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #897: Username is shown as null on login #915
Conversation
@miPlodder, I believe my pull request is ready to merge. Can you help merge it or give me any improvements needed? |
@@ -11,6 +12,7 @@ data class User ( | |||
|
|||
var userId: Long = 0, | |||
var isAuthenticated: Boolean = false, | |||
@SerializedName(value = "username") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ethan627hsu It's also a correct solution. But Instead, rename userName
to username
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My solution has an advantage over the brute force, I don't have to refactor getters and setters across different files. My solution causes the least amount of overlap with different files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know that, but it's just a typing mistake.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So your suggesting that I rename the field and refactor it across all of its references?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, moreover it not used much.
@miPlodder, I successfully implemented your strategy. Can you review my pull request for any other need modifications before merging? |
@ethan627hsu Good job. Submit your task, I will approve it. |
Fixes #897
The welcome toast shows the "Welcome" with the username, instead of "Welcome null". I solved the issue by addressing an error in the Retrofit implementation. The change helps Retrofit recognize the field properly.